How to Repair a Mac Disk with fsck from Single User Mode
Using Disk Utility through Recovery Mode is the preferred and primary tool for repairing disks on the Mac platform, but if Disk Utility is either unavailable or not able to repair a drive, then Single User Mode and the command line tool fsck should be your next choice.
The fsck tool is bundled with every Mac, but because it’s accessible exclusively through the command line it may appear complex and sound more intimidating than it really is. Fear not though, because using fsck is actually quite simple, and there are several cases where it can repair a problem with a drive that Disk Utility was unable to.
How to use Single User Mode and fsck to repair a disk
- Boot the Mac into Single User Mode by holding down Command+S during system boot after you hear the boot chime, you know you will have successfully entered Single User Mode because you will see a bunch of white text on a black background scroll by
- When the Single User boot sequence has finished, you’ll find a small command prompt at the bottom of the screen prefixed by a hash sign (#), when you see that type the following command exactly:
- Once fsck completes, if you see a “File system was modified” message, then you should run “fsck -fy” again until you see a message stating “The volume (name) appears to be OK” – this is standard procedure of using fsck
- Type “reboot” to leave Single User Mode and boot the Mac back into OS X as usual
fsck -fy
Once OS X is booted again, it can be a good idea to confirm all is well by going back to Disk Utility and running the “Verify” tool to check on the drives health.
Keep in mind that if the ‘fsck’ tool continuously fails or reports errors and Disk Utility is a no go as well, the hard drive itself very well may be failing and on its last legs, so be sure to initiate a back up all of your critical data using Time Machine or your backup method of choice, and aim to get the drive replaced sooner than later.
This article is an amazing gift to anyone that gets to it. I will be trying it tomorrow morning, but am so impressed and grateful at how The article made this process very simple to follow with clear step by step directions. Seems to have helped so many. I 🤞it will help repair my MacBook Pro crucial mx525 SSD, that worked fine for 3 years then after a soft fall from
Sofa to floor, the screen immediately switched to lines and boxes, vertical and horizontal, shaking as though vibrating. Then went dark. Now it starts, bings, shows logo and loading bar, then goes black.
Thanks for your help.
It actually worked in my case.
After fsck -ty
Is finished it reads” Rebuilding catalog B-tree.” Then “ The volume Untitled could not be repaired “ followed by “ The volume was modified “ Any help on what to do next is greatly appreciated.
Thanks problem solved
I got volume is Journaled.No checking performed. Use the f option to force checking . How do I do that ? Please help
Fixed!!! Thanks
After updating OSX Sierra I can’t boot. Using an external firewire drive boot to High Sierra, and internal drive shows, then disconnects repeatedly. 2 of 3 partitions still HPS+, am copying them to backup, but boot drive unreadable under Linux. I think update did an upGRADE and started conversion of boot partition to APFS and didn’t complete.
Now my drive us screwed up. Trying to resolve this.
I have a 2008 MacBook that was reset to factory mode but now when trying to set it up it only goes so far into the setup (to setup user name) then starts all over again. I can’t get further in process. Help please thanks Jean
How do I make terminal run fsck on a partition instead of it defaulting to the boot partition?
My external HDD has been wiped clean probably because of improper HDD device disconnection from MAC. or it may have been infected with a malicious virus.
So HDD is now titled “UNTITLED”. All 3TB has disappeared.
Is there any way to repair via fsck from single user mode?
kindly advise ?
i type “purge” in the terminal, and now every time i try to turn on my computer i am stuck in the recovery mode..what should i do.
This really worked well for me – fsck fixed the hierarchy error on my disk wich Disk Utility could not fix. Thanks!
Hey, please help!
I have done some ‘repairing’ in linux. since then the device won’t boot. this is what I get in disk utility:
Volume name : TimeWarp
Volume type : Physical Volume
BSD device node : disk4s2
File system : Mac OS Extended (Journaled)
Connection : USB
Device tree path : IODeviceTree:/PCI0@0/XHC1@14
Writable : No
Is case-sensitive : No
File system UUID : 00000000-0000-0000-0000-000000000000
Volume capacity : 4,000,408,625,152
Available space (Purgeable + Free) : 0
Purgeable space : 0
Free space : 0
Used space : 4,000,408,625,152
Owners enabled : No
Is encrypted : No
Can be verified : Yes
Can be repaired : Yes
Bootable : No
Journaled : No
Disk number : 4
Partition number : 2
Media name :
Media type : Generic
Ejectable : Yes
Solid state : No
Parent disks : disk4
can I repair this somehow?
thanks guys
Hey,
Could someone help me!!! My mac book pro from 2011 is blocking when the apple appears. I tries to reboot all the devices but no success. I tried to launch single user device Control + S but I receive following error message:
can’t exec /bin/sh for single user: m
What can I do?
worked! thanks mate!
Thanks, it seems this solved my problem (File system check exit code is 8, now zero). I have almost 1-year-old SSD replacing the original hard drive in an Early 2011 MacBook Pro. In that time I cloned my failing HDD using ChronoSync, is possible the failure copied and that’s the reason I’m still experiencing this error? Because, you said in the last sentence to aim to replace my drive, but, THIS IS my new drive. And I can’t contemplate it is already failing.
How do I know my drive haven’t a physical failure? (and thus, shouldn’t be replaced).
my mac is restarts at logo plus it shows broken lines programs codes .i tried disk utility but cudn’t erase it – it shows vol needs minor repair.. i tried fsck -fy also
reboot your Mac and press option button select Wi-Fi recovery options then select disk utility and erase it
Not all heroes wear capes. Thank you kind sir, for doing the Lord’s work!
Also already did the SMC and NVRAM reset 😲
Also to add, the problems began when downloading a large software program, Adobe creative cloud. My suspicion is it was too much for my memory and then the crash began. It also won’t boot is safe mode. Same screen it gets stuck on.
Okay, the problem I am having after going through single user mode, running the file system check is it still won’t reboot after getting the okay message. I ran it three times. The first two said the file system was modified, and then the last run, everything came back okay. I typed reboot and enter. Was prompted for login password. Was able to input thatnand hit enter, but now after 5 minutes, I’m still staring at the grey screen with Apple and spinning pinwheel. It doesn’t boot past this. This was the same issue I had been having which brought me through all the repair steps upto the last attempt in single user. Not sure what the problem is here.
Please help me on this:After restarting my MBP by holding down Command +S key, I arrive at a dark screen with white writings. The problem is that it is not displaying a space or ‘blinker’ for me to type fsck -fy in it.
Thank you so much! Fixed my issue. Computer runs great
THANK YOU SO MUCH. And, yes, I was yelling. In gratitude. Glad to find simple solutions to complicated problems.
Thank you , I have fixed my Mac SSD using fsck.
Thank you so much.
Hi all,
I’ve been experiencing some trouble with my MBP early 2011, running on Mavericks, but last night it completely gave up and is beyond repair by Disk utility, as I tried many advices from the web. There is clear a serious issue with HD so my last ditch effort was the fsck -fyd command on single mode. However, after 6hours I still don’t get the blinking cursor enabling me to type the command… I know I have to be patiente but I started to think over 6 hours is quite long.
As I’m no expert on this I started to think it is repeating the command over and over and they are basically:
hfs_mountfs: hfs_mountfs returned 22, rvp (0xffffff8038ba5f00) name (unknow device)
Cannot mount root, errno = 19
Bsd root: Disk 0s2, major 1, minor 3
Hfs: open_journal_device
?UMñ not found. Waiting 10sec.
hfs_mountfs: hfs_early_journal_init indicate external jnl
I’ve tried the single mode twice, the first time due to low bat it shut down, my bad, so I’ve agian with the power on and it is over 6 hours…
I’m tempted to stop it but I’m afraid to cause a greater damage on an already bad HD.
Please help…Thanks.
I tried the fsck -f,but its showing volume / is mounted with write access. Re-run with (-l) to freeze volume.and i tried fsck -l -f, but its still show fsck: -l flag requires a number.
i dont know how to do next,please help me,thank you.
The command in the article is “fsck -fy” and it should be used on the primary disk from single user mode, or from recovery mode or a boot disk.
I’m sure i enter the single user mode, and i have tried the “fsck -fy” ,it’s showing the same, “volume / is mounted with write access. Re-run with (-l) to freeze volume”.or “-l flag requires a number”. i delete my recovery HD that i cant enter it,so i want to fix it.
Aside from fsck, here is how you can recreate a Recovery partition on Mac
https://osxdaily.com/2016/07/03/recreate-recovery-partition-mac/
Good luck, hope that helps.
Thank you for your help, i’ll try it later.
Thank you so much.
fsck_hfs this worked for me also. But performing this we should first take backup of the our Mac.
I seem to be having the same problem as betina b. After running fsck -fy and going through reboot it is still freezing up at load 1/8th through. Should I run fsck_hfs or fsck -f?
Have an old macbook that I believe is having a kernel panic issue(won’t boot stuck on restart your computer message) won’t boot inyo recovery mode, tried safe mode&after selecting Mac HD was stuck on white screen then shut off. Booted in verbose mode& was able to take picture of the log on my phone. Then restarted into single user to try deck process but the last line stops at system uptime in nanoseconds:23735473361 and won’t let me enter anything, i also took a picture of the screen but I’m not one to post comments or questions much so I don’t even know how to upload or show that to anyone in this comment. I don’t have the original install disks but I know it came with osx 10.5.2 and is a macbook 4,1 .so I’m just wondering exactly what to buy when looking to purchase a new set of install disks, please be as specific with this as possible as I’m getting overwhelmed with all the different versions & names , thank you I appreciate your time.
-not concerned about losing any data on the computer& don’t have any backup/recovery disks
I’ve tried many times by using command “fsck -fy” but still its showing “The volume Mac OS could not be verified completely”
Please help me to fix this error.
I have the same problem. After running “fsck -fy” multiple times in the single user mode, I still see “The volume Macintosh HD could not be verified completely”
Please help me to fix this error.
What’s the point of specifying -f without the -p option?
My Mac is crashed and I tried fsck – fy with /sbin too. It shows the following message ‘ The volume could not be verified’. Please help me. I need my Mac back. Please plea#e please. And I don’t hav os x installation disk.
Over the last few months I began to notice my iPhoto documents were getting corrupted. Either I couldn’t open a photo or video, the screen would be green, or my computer would freeze. Laptop was unable to back up documents as of January 2016. Other than iPhoto, everything ran quick and smooth, until I’d open iPhoto and 50% of the time I’d have an issue.
Last night my computer tweaked out, the screen splitting down the middle and shifting half way across the computer. My mouse could not roam in the middle of the screen between the 6 and 7 keys, and when scrolling left or right it would continue to the other side of the screen, as if in a game of snake. Force restarted and it worked for about an hour until dying again.
Current situation starts computer with chime, grey screen, Apple logo and spinning wheel. Last couple times grey lines appeared across the screen. Every reboot goes well until just before the login screen where it freezes up on the grey screen. Computer sounds normal, fan is running, no overheating.
I’ve done the safe boot, command V, command R, command S with fsck-fy. Got the “volume appears to be okay” message twice. All reboots freeze on the grey screen before the login page, and my caps lock has only successfully lit up twice. Battery responds but other than that the only other function that seems to work is the power button.
PLEASE HELP! My last hope short of returning to the Genius Bar!! Can’t find any other forums with a similar issue to this. Using a MacBook Pro 15″ replaced in 2013! Thanks
Reset SMC and reset NVRAM, otherwise take it for repair
Is there a way to do this on an external drive? Remove the read only?
Did you happen to find a solution to this problem? I’m getting the error message that my Time Machine Backup is corrupt (and also that it’s now a read-only drive since the backup had previously failed and still shows in progress – which is a backup that the system won’t let me delete because I don’t have the correct permissions.) and I’ve tried to repair the drive with Disk Utility, but it always fails. When I boot into recovery mode the Time Capsule doesn’t even show up. I’m willing to try using the “fsck -fy” command, but I don’t know how to do that for ONLY my Time Capsule and not my normal HD (which isn’t giving me any of these types of errors and shows as “OK” when using the disk utility.) does anyone know of a way to repair an external drive WITHOUT using the disk utility? Thanks!
Also – when I run the disk utility on my Time Capsule drive, it’s fine. What I meant to say is that when I try to run the disk utility on my backup sparse bundle that is when I get the error and it says that it’s corrupted.
Your external drive may be failing, it happens and can cause problems. There could be a problem with the Time Machine backups themselves too, you could always format the drive and set it up again, but you’d lose the data on the drive if you format it.
You can get a list of all drives connected to the Mac with ‘diskutil list’ command:
diskutil list
Then you would have to locate the identifier (looks like disk3s2 or something like that) for the Time Machine drive, mount that, and run fsck on that volume.
Good luck! If the drive is failing it would be best to buy a new one, external hard drives are cheap on Amazon these days, here is a list: http://amzn.to/1qEiM1L
OK, I have a MB Pro with a dual drive setup. OS drive and Data drive. It ‘s with the data drive that I’m having trouble. Disk Utility is not able to repair it. So how can I run this fsck command on this disk? I read somewhere to use ‘diskutil list’ to figure out what command line to use. But apparentely, you can’t run diskutil in single-user mode.
Just boot with the working drive, it’s recovery partition or a USB recovery drive, open Terminal and type “diskutil list”. You’ll see the disk identifiers listed on the right. You’ll see several indentifiers for each disk. You want the one that corresponds to the name of the drive (the user partition).
Better late than never :)
I’ve run fsck -fy but keep getting the message ‘volume could not be verified completely. Bash-3.2#
Has anyone overcome this issue, noticed a couple of others have had this same error message.
Thanks
Hii. I badly need help/ I have a snow leopard macbook 10-6-8. The battery was not working properly and since february im using it without battery. But i was using it wiz only 25% brightness on as if i put it on 100 % brightness it switches off instantly. My problem is that since 2 days the brightness came up to full and im not being able to switch the mac on for long. Can u find me a way how i can reduce the mac’s brightness while being in the single user mode. Thank you very much in advance.
Hi, I just yesterday swapped a 32GB-highspeed-SDcard (with ATA adapter) for a 20GB HD in my oldie iBook-G3-600.
I had previously cloned two partitions (MacOS 10.3 / 10.4.11) onto a Samsung-extreme SDcard with CarbonCopyCloner.
I did the change (took me a few hours) only to learn that neither partition would startup …
I tried to re-install MacOSX 10.4 but had NO success. To get things going I tried 10.3 which happily installed.
After applying all fsk and diskutility tricks to be found on the net, I finally got rid of the “keys out of order” notification, BUT. Restarting hopefully, I got a black screen with “can’t exec bin/sh” sadistically spelled out on it.
What finally saved me was totally simple:
I once more cloned the 10.4-partitions contents to a third smaller partition (running 10.3), simply “erased” the 10.4-partition via disk utility -took about a minute- and re-cloned the 10.4 contents back to its original partition.
THIS ONE WORKED.
The solution was SOOOO simple – and would have saved me hours of research, restarts and despair.
Now I have a G3-iBook, absolute silent, and a much quicker system start, plus additional 12GB HD — for just under 40 euros.
Good luck to you, Menseken
I am having the same problem as Bettina and Claire above, any advice?
Thanks a lot. Fixed my issues in el capitan…
You’re the best! Thank you for the clear, concise walk through! Fixed my problem!
Thank you for the clear, concise advice for a novice. After much research for different solutions this was the easiest and fixed my issue.
Much appreciation!
Thank you for the clear, concise advice for a novice. After much research for different solutions this was the easiest and fixed my issue.
Much appreciated!!
Hi there, I’m trying out this method now and I’m getting a lot of “invalid node structure” and “invalid record count” on the black and white command lines after entering the fsck -fy command in single mode. Is this normal and should I wait it out?
Thank you so much! I just ran this and it completely fixed the problems that Disk Utility kept reporting. I’m so glad to know I don’t have to replace my hard drive!
I’ve tried both fsck -f and fsck -fy but keep getting that the ‘volume could not be verified completely. Bash-3.2#
Any advice would be much appreciated thanks
Hi Simon — i’m experiencing the same issue (and error message) on a friend’s MacBook Pro. Was there any resolution for you?
I too, am having the same problem. I have searched online for hours upon hours and I cannot find a solution that works!
You have to run fsck from Single User Mode, recovery mode, or a separate boot partition, otherwise the drive is mounted in write mode and fsck can not work or run properly.
Reboot > hold down OPTION key> choose Recovery mode > go to Utilities menu > Terminal > then run fsck -fy command from there
Thank you!
Re entered it and it’s scrolling really fast the same thing, it says:
Disk0s2: media is not present.
And it’s been scrolling that for quite a while, not sure is it should be doing that or how long it should be doing that for (been over an hour already) but fans blowing and mac is pretty hot?
Any suggestions ?
I tried fsck-fy it says command not found
Tried sbin/fsck-fy and it says no such file or directory?
I have a late 2009 imac updated the software and I cannot get it to boot at all, I got the same code 8 in disk utilities
Anymore suggestions please
There needs to be a space between ‘fsck’ and the flag ‘-fy’ so the proper command is “fsck -fy”, not “fsck-fy”, the space in between characters is essential. Command line always requires precise syntax!
You can also try:
fsck -f
If you want to have it more interactive.
Just a note: don’t suggest using only the “-f” flag for people that are, well, casual users.
They’ll be better off just letting the fsck do its job automatically with “-fy”.
man fsck :
> Without the -p option, fsck audits and interactively repairs inconsistent
> conditions for filesystems. It should be noted that some of the correc-
> tive actions which are not correctable under the -p option will result in
> some loss of data. The amount and severity of data lost may be deter-
> mined from the diagnostic output.
> -y Assume a yes response to all questions asked by fsck; this
> should be used with great caution as this is a free license
> to continue after essentially unlimited trouble has been
> encountered.
Brilliant!! After wasting hours trying to get Disk Utility to fix my computer, and talking to Apple Help people in the USA (to no avail) your instructions worked perfectly.
I’m very grateful
I had to install new SSD after HDD failed. How can I run from command line to fix HDD that I now have connected via USB?
I am having the similar problem, replaced the hard drive in iMac, but now I would like to copy the files from old Mac HDD , I was able to see the folders after connecting USB, but I am not able to copy the files.
Sincerely appreciate your help..please!!!!
I’m getting the “file system modified” running fsck until I get “The volume Macintosh HD appears to be OK.” and finally, typing reboot and hitting return.
still getting stuck at the restart screen when trying to turn on my MacBook though. It’s a 2006. You think this means my hardrive is just on its last legs then?
We have this problem too, did you resolve it ?
Awesome. It’s fixed. :-) Thanks a million
Hello!
I’m having the same problem as Josh with my iMac:
“there is no command line prompt after starting up with command S. The last line finishes with ‘errno 5′. I am also unable to start the computer in recovery mode or safe mode, it just gets to the grey mac loading page and stops with the bar half full but never finishes.”
Can anyone help? Thanks!
Yes, you need to reinstall OS X with Internet Recovery here is how to do that https://osxdaily.com/2014/12/14/reinstall-os-x-mac-internet-recovery/
Or restore from a backup you made
Hi thanks for all the info here! My 09 MacBook pro was updated with a Samsung 512 SSD and 8 Gig memory, it didn’t take the install of Yosemite the first several times when I installed last fall, and now it will not start up, will not let me install back ups from a external drive, I tried disk utility and it says it can’t be repaired I ran a the above mentioned and it says the samething can’t be repaired and invalid volume file, volume directory, volume free block count, it gives the number it should be and the number it is. The volume HD could not be repaired Do you have any suggestions before I call Apple? Thanks!
Mark
I’ve bern trying this method, but having trouble. I get to the root# but then I cannot enter any text. Above that a few lines it reads “singleuser boot — fsck not done”. Am I just not giving it enough time to process? I let it run for fifteen minutes. I wasn’t sure what to expect.
fsck scans your entire hard drive, it can take hours. If you don’t have the time to wait, take it to an Apple Store for repair.
Help! I don’t know what to and how to fix my Mac. When I ran the Fsck -fy this is the message I got:
Running fsck on the boot volume…
** Checking Journaled HFS Plus Volume.
** Checking extents overflow file.
** Checking catalog file.
Keys out of order
(4, 25167)
** Rebuilding catalog B-tree.
** This volume Macintosh HD could not be repaired.
***** FILE SYSTEM WAS MODIFIED *****
I have ran it several times and i still get the message.
I’ve been having permission problems since I upgraded my mid 2009 macbook pro with a ssd drive and 8gb ram a few months ago. However what I notice is that after ejecting my external HDD the permission problems reappear and I have to reinstall everything using safe boot and the last backup in time machine. Does anyone have any idea if the external HDD or the new ssd or ram creates the problem? Is something failing?
Hi,
I’ve had big problems with my macbook, there is no command line prompt after starting up with command S. The last line finishes with ‘errno 5’. I am also unable to start the computer in recovery mode or safe mode, it just gets to the grey mac loading page and stops with the bar half full but never finishes.
Please any help.
sbin/fsck -fy absolutely worked for me on MB Pro. Well done and thanks for sharing.
Hi mate
Can you help me out with my MacBook Pro? I try to boot fsck on my mac according to your suggestion when it failed to show the HDD. When I put fsck in, it said command not found. What should I do?
Thank you
Try sbin/fsck -fy
Thanks, saved my day!
Fixed!!! Thanks
Thanks a ton…!!!
This was really an excellent approach… worked for me on my Macbook Pro HD with lately upgraded to OS X Yosemite…I tried to fix the issue using Disk Utility, but it failed to repair the disk…Then I tried with ‘fsck -fy’ and the first time it showed it’s charm….!!!
This was a splendid advice. I used it for a Yosemite system disk.
The first run of fsck was disappointing:
** The volume Macintosh HD could not be repaired.
*****The volume was modified *****
But the second run was very promising:
** The volume Macintosh HD was repaired successfully.
*****The volume was modified *****
And the third run confirmed
** The volume Macintosh HD appears to be OK.
Thank you very much!
That was easy. The Mac is telling you that once in S.U. Mode!
The trick is how you find the partitions (names) you might have and fsck them.
amazing!! thank you sooo much! i was so mad cuz i bought a used macbook from a private seller and she/he left it logged in. i couldnt download anything. i couldnt change anythiny. for heavens sake i couldnt even get in! anyways thanks! haha(:
Sorry to publish as a reply to Jeniffer, but I can’t see a way to post a standalone comment.
I’m using fsck_hfs on an external unmountable disk which shows up in the Disk Utility but can’t be repaired there. The trouble is it’s bex drive and I don’t know if it’s completed as fsck gives no progress feedback. I loaded the log into a browser (var/log/fsck_hfs.log) and it says:
/dev/rdisk3s3: ** Checking volume bitmap.
/dev/rdisk3s3: Volume bitmap needs minor repair for orphaned blocks
/dev/rdisk3s3: ** Checking volume information.
/dev/rdisk3s3: Invalid volume free block count
/dev/rdisk3s3: (It should be 231534230 instead of 232333870)
/dev/rdisk3s3: Volume header needs minor repair
/dev/rdisk3s3: (2, 0)
/dev/rdisk3s3: ** Repairing volume.
but there is no completion indication. When I try to close terminal, it says it will terminate the running process fsck_hfs. The console was showing 99% CPU usage by this process last night, but this orning it’s zero.
Can I assume fsck is finished? How else would you know?
Thanks for any useful information!
Scroll down past the other comments and there’s a giant standalone comment box. You sound very impatient, not good for running disk repair.
Unless fsck has finished running, which it will indicate by ceasing running on it’s own, do not assume fsck is done running until it has finished running. Period. Your log clearly shows the volume needs repair, and that fsck is “Repairing volume” that means it is repairing the volume. Be patient, it can take a long time if the drive is large, slow, or failing.
If you reboot in the middle of fsck running you can damage the disk and cause data loss. I hope you have a good backup handy.
This worked for me, the problem was fixed and only took about 5 minutes.